#!/usr/bin/env python
"""mapper.py"""

import sys
import re

# input comes from STDIN (standard input)
distinct_ip = []
for line in sys.stdin:
    # remove leading and trailing whitespace
    line = line.strip()
    ip = re.split(" - ", line)[0]
    if ip not in distinct_ip:
        distinct_ip.append(ip)
        print '%s\t%s' % (ip, 1)